VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frmEstadoCuentaPrestamoInternoV 
   BackColor       =   &H00FF00FF&
   BorderStyle     =   5  'Sizable ToolWindow
   ClientHeight    =   1995
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   5760
   FillColor       =   &H00FF80FF&
   ForeColor       =   &H00FF00FF&
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   Picture         =   "frmEstadoCuentaPrestamoInternoV.frx":0000
   ScaleHeight     =   1995
   ScaleWidth      =   5760
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdImprimir 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Imprimir"
      Height          =   615
      Left            =   3960
      Picture         =   "frmEstadoCuentaPrestamoInternoV.frx":21FA32
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   1080
      Width           =   855
   End
   Begin VB.CommandButton CmdCancelar 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Salir"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   4920
      MaskColor       =   &H0080FFFF&
      Picture         =   "frmEstadoCuentaPrestamoInternoV.frx":21FD3C
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   1080
      Width           =   735
   End
   Begin MSDataListLib.DataCombo cboAsesor 
      Bindings        =   "frmEstadoCuentaPrestamoInternoV.frx":2202C6
      Height          =   315
      Left            =   240
      TabIndex        =   1
      Top             =   1200
      Width           =   3495
      _ExtentX        =   6165
      _ExtentY        =   556
      _Version        =   393216
      BackColor       =   16777215
      ListField       =   "nombres"
      BoundColumn     =   "codigo_empleado"
      Text            =   ""
      Object.DataMember      =   "Nombres_EmpleadosN"
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "Codigo Asesor"
      ForeColor       =   &H00C00000&
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   960
      Width           =   1455
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "Detalle de Descuentos"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   360
      TabIndex        =   3
      Top             =   240
      Width           =   5055
   End
End
Attribute VB_Name = "frmEstadoCuentaPrestamoInternoV"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cboAsesor_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub

Private Sub CmdCancelar_Click()
    Unload Me
End Sub

Private Sub cmdImprimir_Click()


On Error Resume Next

    If cboAsesor.BoundText = "" Then Exit Sub
    RutaReportes = DE.rsGENCParametros.Fields("RUTA_REPORTES")
    
    
    ' buscar el tipo de empleado del asesor
    If DE.rsUnidadDeVentaDelEmpleado.State = adStateOpen Then DE.rsUnidadDeVentaDelEmpleado.Close
    DE.UnidadDeVentaDelEmpleado cboAsesor.BoundText
    
    With DE.rsUnidadDeVentaDelEmpleado
        TipoEmpleado = .Fields("TIPOEMPLEADO")
    End With
    
    
    
    
    If TipoEmpleado = "VE" Or TipoEmpleado = "VP" Or TipoEmpleado = "CF" Or TipoEmpleado = "SU" Or _
        TipoEmpleado = "SC" Or TipoEmpleado = "GE" Or TipoEmpleado = "SF" Or TipoEmpleado = "GF" _
        Or TipoEmpleado = "VF" Or TipoEmpleado = "EF" Then
            MDI.reporte.StoredProcParam(0) = Trim(cboAsesor.BoundText)
            MDI.reporte.StoredProcParam(1) = TipoEmpleado
            Imprimir RutaReportes & "EstadoCuentaPrestamoInternoVentas.rpt", "", "", "", ""
            Else
            MDI.reporte.StoredProcParam(0) = Trim(cboAsesor.BoundText)
            MDI.reporte.StoredProcParam(1) = TipoEmpleado
            Imprimir RutaReportes & "EstadoCuentaPrestamoInternoVentas.rpt", "", "", "", ""
    End If



'
'        If cboAsesor.BoundText = "" Then Exit Sub
'        RutaReportes = DE.rsGENCParametros.Fields("RUTA_REPORTES")
'        MDI.reporte.StoredProcParam(0) = cboAsesor.BoundText
'        Imprimir RutaReportes & "EstadoCuentaPrestamoInternoVentas.rpt", "", "", "", ""
        
End Sub

